﻿using System.Collections.Generic;
using com.guojin.core.io;
using com.guojin.core.io.message;


namespace com.guojin.mj.net.message.game
{
    public class LetSbOutReq: Message
    {
        public static int TYPE = 12 ;
        public static int ID =  49 ;

        public string Name { get; set; }           //申请人姓名
        public int UserId { get; set; }               //申请人userId
        public int OutUserId { get; set; }         //被踢玩家的userId   

        public void decode(Input _in)
        {
          
        }

        public void encode(Output _out)
        {
            _out.writeString(Name);
            _out.writeInt(UserId);
            _out.writeInt(OutUserId);
        }

        public int getMessageId()
        {
            return ID;
        }

        public int getMessageType()
        {
            return TYPE;
        }

        public string toString()
        {
            return string.Format("name = {0}, userId = {1}, outUserId = {2}" , Name, UserId, OutUserId);
        }

        public static LetSbOutReq create(string name, int userId, int outUserId)
        {
            var temp = new LetSbOutReq();
            temp.Name = name;
            temp.UserId = userId;
            temp.OutUserId = outUserId;
            return temp;
        }
    }
}